package com.ysd.dao.impl;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import com.sun.media.jfxmediaimpl.platform.gstreamer.GSTPlatform;
import com.ysd.entity.GongShiTuPian;
import com.ysd.util.DBManager;

public class GongShiTuPianDaoimpl {
	/**
	 * 获得公司的图片
	 * @return
	 */
	public GongShiTuPian getGongShiTuPian() {
		
		
		Connection conn =DBManager.getConnection();
		GongShiTuPian gstp=null;
		try {
			Statement st=conn.createStatement();
			String sql="SELECT * FROM gongshitupian";
			ResultSet rs=st.executeQuery(sql);
			while(rs.next()){
				gstp=new GongShiTuPian(rs.getString("gongShiSHouYe"), rs.getString("gongShiJieShao"), rs.getString("gongWenHuaTu"));			
			}
			return gstp;
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
	}
}
